package com.whfc.fmam.entity.enums;

/**
 * @author : likang
 * @Description: 材料计划审批状态
 */
public enum MatPlanCheckState {

    TO_BE_CHECK(10, "待审批"),

    UNQUALIFIED_CHECK(11, "审批不合格"),

    QUALIFIED_CHECK(12, "审批合格"),

    TO_BE_REVIEWED(20, "待复审"),

    TO_BE_VERIFY(30, "待核验"),

    SUCCESS(100, "已完成");

    private Integer value;

    private String desc;

    public Integer getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    MatPlanCheckState(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static MatPlanCheckState parseValue(int value) {
        switch (value) {
            case 10:
                return TO_BE_CHECK;
            case 11:
                return UNQUALIFIED_CHECK;
            case 12:
                return QUALIFIED_CHECK;
            case 20:
                return TO_BE_REVIEWED;
            case 30:
                return TO_BE_VERIFY;
            case 100:
                return SUCCESS;
            default:
                return null;
        }
    }

}
